# -*- coding: utf-8 -*-
# @version : 1.0
# @File    : crud.py
# @Date    : 2024/9/27 13:05
# @Author  : GlenZhao
# @Desc    :

from sqlalchemy.ext.asyncio import AsyncSession

from apps.auth.user.models import AuthUser, AuthRole
from apps.auth.user.schemas import UserSimpleOut, RoleSimpleOut, UpdateUserIn
from core.crud import DalBase


class UserDal(DalBase):

    def __init__(self, db: AsyncSession):
        super(UserDal, self).__init__()
        self.db = db
        self.model = AuthUser
        self.schema = UserSimpleOut


class RoleDal(DalBase):

    def __init__(self, db: AsyncSession):
        super(RoleDal, self).__init__()
        self.db = db
        self.model = AuthRole
        self.schema = RoleSimpleOut
